package smcms.service.sso.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.core.parameters.P;
import org.springframework.web.bind.annotation.*;
import smcms.commons.api.entity.result.CommonsResult;
import smcms.service.sso.entity.StaffInfoReq;
import smcms.service.sso.service.ResourceService;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

@RestController
@RequestMapping("/ResourceController")
public class ResourceController {
    @Autowired
    private CommonsResult commonsResult;
    @Autowired
    private ResourceService resourceService;

    @PostMapping("/staffInfoExport")
    public CommonsResult staffInfoExport(@RequestBody StaffInfoReq req, HttpServletRequest request, HttpServletResponse  response){
        CommonsResult commonsResult = resourceService.exportStaffInfo(req, request, response);
        return commonsResult;
    }
}
